import { serverBase } from '@/axios/index';


/**
 * 登录授权
 */

/**
 * 账号密码登陆
 * @param data
 * @returns {Promise<void>}
 */
export const postAuthLogin = (data = {}) => serverBase.post('/sys/auth/v1/login/pwd', data, { loading: true });

/**
 * 退出登陆
 * @param data
 * @returns {Promise<void>}
 */
export const postAuthLogout = (data = {}) => serverBase.post('/sys/auth/v1/logout', data, { loading: true });



/**
 * 系统角色
 */

/**
 * 新增系统角色
 * @param data
 * @returns {Promise<void>}
 */
export const postRoleAdd = (data = {}) => serverBase.post('/sys/role/v1/add', data, { loading: true });
/**
 * 删除系统角色
 * @param data
 * @returns {Promise<void>}
 */
export const postRoleDelete = (data = {}) => serverBase.post('/sys/role/v1/delete', data, { loading: true });
/**
 * 查询系统角色详情
 * @param data
 * @returns {Promise<void>}
 */
export const postRoleDetail = (data = {}) => serverBase.post('/sys/role/v1/detail', data, { loading: true });
/**
 * 查询系统角色列表
 * @param data
 * @returns {Promise<void>}
 */
export const postRoleList = (data = {}) => serverBase.post('/sys/role/v1/list', data, { loading: true });
/**
 * 查询系统角色分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postRolePage = (data = {}) => serverBase.post('/sys/role/v1/page', data, { loading: true });
/**
 * 更新系统角色
 * @param data
 * @returns {Promise<void>}
 */
export const postRoleUpdate = (data = {}) => serverBase.post('/sys/role/v1/update', data, { loading: true });


/**
* 广告
*/

/**
 * 新增广告
 * @param data
 * @returns {Promise<void>}
 */
export const postBannerAdd = (data = {}) => serverBase.post('/sys/banner/v1/add', data, { loading: true });
/**
 * 删除广告
 * @param data
 * @returns {Promise<void>}
 */
export const postBannerDelete = (data = {}) => serverBase.post('/sys/banner/v1/delete', data, { loading: true });
/**
 * 查询广告详情
 * @param data
 * @returns {Promise<void>}
 */
export const postBannerDetail = (data = {}) => serverBase.post('/sys/banner/v1/detail', data, { loading: true });
/**
 * 查询广告分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postBannerPage = (data = {}) => serverBase.post('/sys/banner/v1/page', data, { loading: true });
/**
 * 广告置顶
 * @param data
 * @returns {Promise<void>}
 */
export const postBannerTop = (data = {}) => serverBase.post('/sys/banner/v1/topping', data, { loading: true });
/**
 * 更新广告
 * @param data
 * @returns {Promise<void>}
 */
export const postBannerUpdate = (data = {}) => serverBase.post('/sys/banner/v1/update', data, { loading: true });

/**
* 操作日志
*/

/**
 * 查询操作日志详情
 * @param data
 * @returns {Promise<void>}
 */
export const postOperDetail = (data = {}) => serverBase.post('/sys/oper/log/v1/detail', data, { loading: true });
/**
 * 查询操作日志分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postOperPage = (data = {}) => serverBase.post('/sys/oper/log/v1/page', data, { loading: true });


/**
* 设备
*/

/**
 * 删除设备
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceDelete = (data = {}) => serverBase.post('/sys/device/v1/delete', data, { loading: true });
/**
 * 下载二维码
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceQrDownload = (data = {}) => serverBase.getFile('/sys/device/v1/qr/download', data, { loading: true ,timeout: 30 * 60 * 1000});
/**
 * 导出设备
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceExport = (data = {}) => serverBase.getFile('/sys/device/v1/export', data, { loading: true });
/**
 * 更换原料
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceMaterialReplace = (data = {}) => serverBase.post('/sys/device/v1/material/replace', data, { loading: true });
/**
 * 查询设备分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postDevicePage = (data = {}) => serverBase.post('/sys/device/v1/page', data, { loading: true });
/**
 * 查询设备套餐列表
 * @param data
 * @returns {Promise<void>}
 */
export const postDevicePackageList = (data = {}) => serverBase.post('/sys/device/v1/package/list', data, { loading: true });
/**
 * 更新设备套餐
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceUpdatePackage = (data = {}) => serverBase.post('/sys/device/v1/update/package', data, { loading: true });
/**
 * 查询设备详情
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceDetail = (data = {}) => serverBase.post('/sys/device/v1/detail', data, { loading: true });
/**
 * 查询设备统计
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceStatistics = (data = {}) => serverBase.post('/sys/device/v1/statistics', data, { loading: true });
/**
 * 解绑设备
 * @param data
 * @returns {Promise<void>}
 */
export const postDeviceUnbind = (data = {}) => serverBase.post('/sys/device/v1/unbind', data, { loading: true });






/**
* 客户端用户
*/

 /**
  * 查询客户端用户详情
  * @param data
  * @returns {Promise<void>}
  */
 export const postClientUserDetail = (data = {}) => serverBase.post('/sys/client/user/v1/detail', data, { loading: true });
 /**
  * 查询客户端用户分页列表
  * @param data
  * @returns {Promise<void>}
  */
 export const postClientUserPage = (data = {}) => serverBase.post('/sys/client/user/v1/page', data, { loading: true });
 /**
  * 导出客户端用户
  * @param data
  * @returns {Promise<void>}
  */
 export const postClientUserExport = (data = {}) => serverBase.getFile('/sys/client/user/v1/export', data, { loading: true });
 /**
  * 更新客户端用户状态
  * @param data
  * @returns {Promise<void>}
  */
 export const postClientUserUpdateStatus = (data = {}) => serverBase.post('/sys/client/user/v1/update/status', data, { loading: true });
 



/**
* 商户
*/

/**
 * 新增商户
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserAdd = (data = {}) => serverBase.post('/sys/shop/user/v1/add', data, { loading: true });
/**
 * 删除商户
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserDelete = (data = {}) => serverBase.post('/sys/shop/user/v1/delete', data, { loading: true });
/**
 * 查询商户详情
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserDetail = (data = {}) => serverBase.post('/sys/shop/user/v1/detail', data, { loading: true });
/**
 * 查询商户列表
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserList = (data = {}) => serverBase.post('/sys/shop/user/v1/list', data, { loading: true });
/**
 * 查询商户分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserPage = (data = {}) => serverBase.post('/sys/shop/user/v1/page', data, { loading: true });
/**
 * 查询商户统计
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserStatistics = (data = {}) => serverBase.post('/sys/shop/user/v1/statistics', data, { loading: true });
/**
 * 更新商户
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserUpdate = (data = {}) => serverBase.post('/sys/shop/user/v1/update', data, { loading: true });
/**
 * 更新商户状态
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUserUpdateStatus = (data = {}) => serverBase.post('/sys/shop/user/v1/update/status', data, { loading: true });


/**
* 系统菜单
*/

/**
 * 新增系统菜单
 * @param data
 * @returns {Promise<void>}
 */
export const postMenuAdd = (data = {}) => serverBase.post('/sys/menu/v1/add', data, { loading: true });
/**
 * 删除系统菜单
 * @param data
 * @returns {Promise<void>}
 */
export const postMenuDelete = (data = {}) => serverBase.post('/sys/menu/v1/delete', data, { loading: true });
/**
 * 查询系统菜单详情
 * @param data
 * @returns {Promise<void>}
 */
export const postMenuDetail = (data = {}) => serverBase.post('/sys/menu/v1/detail', data, { loading: true });
/**
 * 查询用户菜单权限列表
 * @param data
 * @returns {Promise<void>}
 */
export const postMenuPermissionTree = (data = {}) => serverBase.post('/sys/menu/v1/permission/tree/list', data, { loading: true });
/**
 * 查询系统菜单树列表
 * @param data
 * @returns {Promise<void>}
 */
export const postMenuTree = (data = {}) => serverBase.post('/sys/menu/v1/tree/list', data, { loading: true });
/**
 * 更新系统菜单
 * @param data
 * @returns {Promise<void>}
 */
export const postMenuUpdate = (data = {}) => serverBase.post('/sys/menu/v1/update', data, { loading: true });
/**
 * 更新系统菜单
 * @param data
 * @returns {Promise<void>}
 */
export const postQrDown = (data = {}) => serverBase.getFile('/sys/param/v1/qr/download', data, { loading: true });



/**
* 门店
*/

/**
 * 新增门店
 * @param data
 * @returns {Promise<void>}
 */
export const postShopAdd = (data = {}) => serverBase.post('/sys/shop/v1/add', data, { loading: true });
/**
 * 查询门店详情
 * @param data
 * @returns {Promise<void>}
 */
export const postShopDetail = (data = {}) => serverBase.post('/sys/shop/v1/detail', data, { loading: true });
/**
 * 导出数据
 * @param data
 * @returns {Promise<void>}
 */
export const postShopExport = (data = {}) => serverBase.getFile('/sys/shop/v1/export', data, { loading: true });
/**
 * 查询门店分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postShopPage = (data = {}) => serverBase.post('/sys/shop/v1/page', data, { loading: true });
/**
 * 查询已绑定门店账号列表
 * @param data
 * @returns {Promise<void>}
 */
export const postShopBoundUserList = (data = {}) => serverBase.post('/sys/shop/v1/bound/shop/user/list', data, { loading: true });
/**
 * 绑定门店账号
 * @param data
 * @returns {Promise<void>}
 */
export const postShopBoundUser = (data = {}) => serverBase.post('/sys/shop/v1/bind/shop/user', data, { loading: true });
/**
 * 删除已绑定门店账号
 * @param data
 * @returns {Promise<void>}
 */
export const postShopBoundUserDelete = (data = {}) => serverBase.post('/sys/shop/v1/shop/user/delete', data, { loading: true });
/**
 * 删除门店
 * @param data
 * @returns {Promise<void>}
 */
export const postShopDelete = (data = {}) => serverBase.post('/sys/shop/v1/delete', data, { loading: true });
/**
 * 查询门店统计
 * @param data
 * @returns {Promise<void>}
 */
export const postShopStatistics = (data = {}) => serverBase.post('/sys/shop/v1/statistics', data, { loading: true });
/**
 * 更新门店
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUpdate = (data = {}) => serverBase.post('/sys/shop/v1/update', data, { loading: true });
/**
 * 更新门店状态
 * @param data
 * @returns {Promise<void>}
 */
export const postShopUpdateStatus = (data = {}) => serverBase.post('/sys/shop/v1/update/status', data, { loading: true });


/**
* 系统用户
*/

/**
 * 新增系统用户
 * @param data
 * @returns {Promise<void>}
 */
export const postUserAdd = (data = {}) => serverBase.post('/sys/user/v1/add', data, { loading: true });
/**
 * 删除系统用户
 * @param data
 * @returns {Promise<void>}
 */
export const postUserDelete = (data = {}) => serverBase.post('/sys/user/v1/delete', data, { loading: true });
/**
 * 查询系统用户详情
 * @param data
 * @returns {Promise<void>}
 */
export const postUserDetail = (data = {}) => serverBase.post('/sys/user/v1/detail', data, { loading: true });
/**
 * 查询登陆系统用户信息
 * @param data
 * @returns {Promise<void>}
 */
export const postUserInfo = (data = {}) => serverBase.post('/sys/user/v1/info', data, { loading: true });
/**
 * 查询系统用户列表
 * @param data
 * @returns {Promise<void>}
 */
export const postUserList = (data = {}) => serverBase.post('/sys/user/v1/list', data, { loading: true });
/**
 * 查询系统用户分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postUserPage = (data = {}) => serverBase.post('/sys/user/v1/page', data, { loading: true });
/**
 * 重置系统用户密码
 * @param data
 * @returns {Promise<void>}
 */
export const postUserResetPwd = (data = {}) => serverBase.post('/sys/user/v1/reset/pwd', data, { loading: true });
/**
 * 更新系统用户
 * @param data
 * @returns {Promise<void>}
 */
export const postUserUpdate = (data = {}) => serverBase.post('/sys/user/v1/update', data, { loading: true });
/**
 * 更新系统用户状态
 * @param data
 * @returns {Promise<void>}
 */
export const postUserUpdateStatus = (data = {}) => serverBase.post('/sys/user/v1/update/status', data, { loading: true });




/**
* 财务帐单
*/

/**
 * 导出数据
 * @param data
 * @returns {Promise<void>}
 */
export const postFinancialBillExport = (data = {}) => serverBase.getFile('/sys/financial/bill/v1/export', data, { loading: true });
/**
 * 查询服务订单分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postFinancialBillOrderPage = (data = {}) => serverBase.post('/sys/financial/bill/v1/order/page', data, { loading: true });
/**
 * 查询财务账单分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postFinancialBillPage = (data = {}) => serverBase.post('/sys/financial/bill/v1/page', data, { loading: true });
/**
 * 查询财务账单统计
 * @param data
 * @returns {Promise<void>}
 */
export const postFinancialBillStatistics = (data = {}) => serverBase.post('/sys/financial/bill/v1/statistics', data, { loading: true });
/**
 * 服务订单退费
 * @param data
 * @returns {Promise<void>}
 */
export const postFinancialOrderRefund = (data = {}) => serverBase.post('/sys/financial/bill/v1/order/refund', data, { loading: true });
/**
 * 导出服务订单数据
 * @param data
 * @returns {Promise<void>}
 */
export const postFinancialOrderExport = (data = {}) => serverBase.getFile('/sys/financial/bill/v1/order/export', data, { loading: true });


/**
* 套餐
*/

/**
 * 查询套餐分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postPackagePage = (data = {}) => serverBase.post('/sys/package/v1/page', data, { loading: true });
/**
 * 更新套餐状态
 * @param data
 * @returns {Promise<void>}
 */
export const postPackageUpdate = (data = {}) => serverBase.post('/sys/package/v1/update', data, { loading: true });


/**
* 系统设置
*/

/**
 * 查询系统设置列表
 * @param data
 * @returns {Promise<void>}
 */
export const postParamList = (data = {}) => serverBase.post('/sys/param/v1/list', data, { loading: true });
/**
 * 批量更新系统设置
 * @param data
 * @returns {Promise<void>}
 */
export const postParamUpdate = (data = {}) => serverBase.post('/sys/param/v1/batch/update', data, { loading: true });


/**
* 系统设置
*/

/**
 * 查询意见反馈分页列表
 * @param data
 * @returns {Promise<void>}
 */
 export const postFeedbackList = (data = {}) => serverBase.post('/sys/feedback/v1/page', data, { loading: true });
 /**
  * 查询意见反馈详情
  * @param data
  * @returns {Promise<void>}
  */
 export const postFeedbackDetail = (data = {}) => serverBase.post('/sys/feedback/v1/detail', data, { loading: true });
 /**
  * 处理反馈
  * @param data
  * @returns {Promise<void>}
  */
 export const postFeedbackHandle = (data = {}) => serverBase.post('/sys/feedback/v1/handle', data, { loading: true });
/**
 * 反馈数量
 * @param data
 * @returns {Promise<void>}
 */
export const postFeedbackNoReadNum = (data = {}) => serverBase.post('/sys/feedback/v1/no/read/num', data, { loading: true });





/**
* 代理商
*/

/**
 * 查询代理商分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentPage = (data = {}) => serverBase.post('/sys/agent/v1/page', data, { loading: true });
/**
 * 新增代理商
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentAdd = (data = {}) => serverBase.post('/sys/agent/v1/add', data, { loading: true });
/**
 * 绑定代理设备
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentBindDevice = (data = {}) => serverBase.post('/sys/agent/v1/bind/device', data, { loading: true });
/**
 * 绑定代理门店
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentBindShop = (data = {}) => serverBase.post('/sys/agent/v1/bind/shop', data, { loading: true });
/**
 * 可绑定代理设备列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentBindableDeviceList = (data = {}) => serverBase.post('/sys/agent/v1/bindable/device/list', data, { loading: true });
/**
 * 可绑定代理门店列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentPageBindableShopList = (data = {}) => serverBase.post('/sys/agent/v1/bindable/shop/list', data, { loading: true });
/**
 * 已绑定代理设备列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentBoundDevicePage = (data = {}) => serverBase.post('/sys/agent/v1/bound/device/page', data, { loading: true });
/**
 * 已绑定代理门店列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentBoundShopPage = (data = {}) => serverBase.post('/sys/agent/v1/bound/shop/page', data, { loading: true });
/**
 * 删除代理商
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentDelete = (data = {}) => serverBase.post('/sys/agent/v1/delete', data, { loading: true });
/**
 * 查询代理商详情
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentDetail = (data = {}) => serverBase.post('/sys/agent/v1/detail', data, { loading: true });
/**
 * 重置代理商密码
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentResetPwd = (data = {}) => serverBase.post('/sys/agent/v1/reset/pwd', data, { loading: true });
/**
 * 解绑代理设备
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentUnbindDevice = (data = {}) => serverBase.post('/sys/agent/v1/unbind/device', data, { loading: true });
/**
 * 解绑代理门店
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentUnbindShop = (data = {}) => serverBase.post('/sys/agent/v1/unbind/shop', data, { loading: true });
/**
 * 更新代理商
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentUpdate = (data = {}) => serverBase.post('/sys/agent/v1/update', data, { loading: true });
/**
 * 更新商户抽成比例
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentUpdateShopRatio = (data = {}) => serverBase.post('/sys/agent/v1/update/shop/Ratio', data, { loading: true });
/**
 * 更新代理商状态
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentUpdateStatus = (data = {}) => serverBase.post('/sys/agent/v1/update/status', data, { loading: true });
/**
 * 更新VIP代理商
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentVipUpdate = (data = {}) => serverBase.post('/sys/agent/v1/vip/update', data, { loading: true });
/**
 * 导出收入明细
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentWalletLogExport = (data = {}) => serverBase.post('/sys/agent/v1/wallet/log/export', data, { loading: true });
/**
 * 查询收入明细分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentWalletLogPage = (data = {}) => serverBase.post('/sys/agent/v1/wallet/log/page', data, { loading: true });
// /**
//  * 查询财务分页列表
//  * @param data
//  * @returns {Promise<void>}
//  */
// export const postAgentWithdrawPage = (data = {}) => serverBase.post('/sys/agent/v1/withdraw/page', data, { loading: true });
/**
 * 导出提现明细
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentWithdrawExport = (data = {}) => serverBase.post('/sys/agent/v1/withdraw/export', data, { loading: true });
/**
 * 查询代理订单分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentOrderPage = (data = {}) => serverBase.post('/sys/agent/v1/order/page', data, { loading: true });
/**
 * 查询财务分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postAgentWithdrawPage = (data = {}) => serverBase.post('/sys/agent/withdraw/v1/page', data, { loading: true });